import com.common.service.CommonService;
import com.common.util.BaseMainTestClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * Date 2018/07/05
 *
 * @author MT-Lin
 */
@SuppressWarnings("ALL")
public class ClusterFaultToleranceConsumerMain extends BaseMainTestClass {

    private static Logger logger = LoggerFactory.getLogger(ClusterFaultToleranceConsumerMain.class);

    public static void main(String[] args) throws InterruptedException, IOException {
        System.setProperty("java.net.preferIPv4Stack", "true");
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                new String[]{"META-INF/spring/dubbo-cluster-fault-tolerance-consumer.xml"});
        context.start();
        CommonService commonService = context.getBean(CommonService.class);
        commonService.getFromWhere("1","2");
        System.in.read();
    }

    @Override
    public void setLogger() {
        super.setLogger(LoggerFactory.getLogger(ClusterFaultToleranceConsumerMain.class));
    }
}
